package com.atguigu.userprofile.common.dao

import com.atguigu.userprofile.common.bean.TaskTagRule
import com.atguigu.userprofile.common.util.MySqlUtil

object TaskTagRuleDAO {


      def getTaskTagRuleList(taskId:String): List[TaskTagRule] ={

          val taskTagRules: List[TaskTagRule] = MySqlUtil.queryList(
            s"""select
               |tr.id,tr.tag_id,tr.task_id,tr.query_value,
               |   sub_tag_id,tg.tag_name as sub_tag_value
               |from task_tag_rule tr  , tag_info tg where  tr.task_id='$taskId' and   tg.id=tr.sub_tag_id
             """.stripMargin
            ,classOf[TaskTagRule],true)
          taskTagRules
      }

}
